package com.demo;

public class Demo4Singleton {
    private static final int a = 1;
    private static Demo4Singleton singleton;

    private Demo4Singleton() {
    }

    public static Demo4Singleton getSingleton() {
        if (singleton == null) {
            singleton = new Demo4Singleton();
        }
        return singleton;
    }
}
